﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace OnATous.BusinessManagement
{
    public class Rating
    {
        DataAccess.Rating ratingDataAccess;

        public Rating()
        {
            ratingDataAccess = new DataAccess.Rating();
        }

        public bool CreateRate(Int64 idUser, Int64 idContact, int idFeaturePrimary, int idFeatureSecondary, int idFeatureTertiary, int score, string comments, bool isValide)
        {
            return ratingDataAccess.CreateRate(idUser, idContact, idFeaturePrimary, idFeatureSecondary, idFeatureTertiary, score, comments, isValide);
        }

        public bool ModifyRate(DBO.Rating rate)
        {
            return ratingDataAccess.ModifyRate(rate);
        }

        public int GetNotationCount(DBO.User user)
        {
            return ratingDataAccess.GetNotationCount(user);
        }

        public List<DBO.User> GetRatedContacts(DBO.User user)
        {
            return ratingDataAccess.GetRatedContacts(user);
        }

        public List<DBO.User> GetNonRatedContacts(DBO.User user)
        {
            return ratingDataAccess.GetNonRatedContacts(user);
        }

        public DBO.Rating GetRate(DBO.User user, DBO.User friend)
        {
            return ratingDataAccess.GetRate(user, friend);
        }
        public float GetMoyenne(DBO.User user)
        {
            return ratingDataAccess.GetMoyenne(user);
        }
        public List<int> GetListCountFeature(DBO.User user)
        {
            return ratingDataAccess.GetListCountFeature(user);
        }

        public Dictionary<Int64, float> GetMarks()
        {
            return ratingDataAccess.GetMarks();
        }
    }
}